using System;
using System.Threading.Tasks;
using UnityEngine;

namespace GameLauncher.Runtime
{
    public struct StateResult
    {
        public bool IsSuccess;
        public string Error;
        public object Data;

        public static StateResult Success(object data = null) => new StateResult
        {
            IsSuccess = true,
            Data = data
        };

        public static StateResult Failure(string error) => new StateResult
        {
            IsSuccess = false,
            Error = error
        };
    }
}